﻿using System;

namespace IllusionUtility.GetUtility
{
	// Token: 0x020003EB RID: 1003
	public static class EnumExtensions
	{
		// Token: 0x060018FD RID: 6397 RVA: 0x000A21EC File Offset: 0x000A03EC
		public static bool HasFlag(this Enum self, Enum flag)
		{
			return self.AND(flag) == Convert.ToUInt64(flag);
		}

		// Token: 0x060018FE RID: 6398 RVA: 0x000A2200 File Offset: 0x000A0400
		public static ulong Add(this Enum self, Enum flag)
		{
			return self.OR(flag);
		}

		// Token: 0x060018FF RID: 6399 RVA: 0x000A220C File Offset: 0x000A040C
		public static ulong Sub(this Enum self, Enum flag)
		{
			return Convert.ToUInt64(self) & flag.NOT();
		}

		// Token: 0x06001900 RID: 6400 RVA: 0x000A221C File Offset: 0x000A041C
		public static ulong Get(this Enum self, Enum flag)
		{
			return self.AND(flag);
		}

		// Token: 0x06001901 RID: 6401 RVA: 0x000A2228 File Offset: 0x000A0428
		public static ulong Reverse(this Enum self, Enum flag)
		{
			return self.XOR(flag);
		}

		// Token: 0x06001902 RID: 6402 RVA: 0x000A2234 File Offset: 0x000A0434
		public static ulong NOT(this Enum self)
		{
			return ~Convert.ToUInt64(self);
		}

		// Token: 0x06001903 RID: 6403 RVA: 0x000A2240 File Offset: 0x000A0440
		public static ulong AND(this Enum self, Enum flag)
		{
			return Convert.ToUInt64(self) & Convert.ToUInt64(flag);
		}

		// Token: 0x06001904 RID: 6404 RVA: 0x000A2250 File Offset: 0x000A0450
		public static ulong OR(this Enum self, Enum flag)
		{
			return Convert.ToUInt64(self) | Convert.ToUInt64(flag);
		}

		// Token: 0x06001905 RID: 6405 RVA: 0x000A2260 File Offset: 0x000A0460
		public static ulong XOR(this Enum self, Enum flag)
		{
			return Convert.ToUInt64(self) ^ Convert.ToUInt64(flag);
		}
	}
}
